registerTests([
function Max_0(){
	var myArray = [1, 2, 99, 3, 5];
	var result = myArray.Max();
	Assert.isDefined(result);
	Assert.areEqual(result, 99);
},
function Max_Selector_0()
{
	var myArray = [{x: 6}, {x: 99}, {x: 2}];

	var result = myArray.Max("o=>o.x");
	Assert.isDefined(result);
	Assert.areEqual(result.x, 99);
},
function Max_Selector_Comparator_0()
{
	var myArray = [{x: "Hi"}, {x: "Hello"}, {x: "Hello There!"}];

	var result = myArray.Max("o=>o.x", function(a, b) { return a.length > b.length ? 1 : a.length < b.length ? -1 : 0; });
	Assert.isDefined(result);
	Assert.areEqual(result.x, "Hello There!");
},
]);